package com.gaogzhen.utils;

import com.gaogzhen.domain.SysMenu;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.authority.SimpleGrantedAuthority;

import java.util.List;

/**
 * 登录成功的结果
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "登录结果")
public class LoginResult {
    /**
     * 登录成功的token,来自authorization-server
     */
    @ApiModelProperty(value = "登录成功的token")
    private String token;

    /**
     * 菜单列表
     */
    @ApiModelProperty(value = "菜单列表")
    private List<SysMenu> menus;

    /**
     * 权限列表
     */
    @ApiModelProperty(value = "权限列表")
    private List<SimpleGrantedAuthority> authorities;
}
